﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Web.Core.Domain;

namespace Web.Data.Mapping.User
{
    class UserTblMap : EntityTypeConfiguration<UserTbl>
    {
        public override void Configure(EntityTypeBuilder<UserTbl> builder)
        {
            builder.ToTable("USER_TBL");
            builder.HasKey(orderItem => orderItem.UserCode);
            builder.Property(p => p.AutoId).HasField("AutoId").UseSqlServerIdentityColumn();
            builder.Property(p => p.UserCode).HasField("UserCode");
            builder.Property(p => p.Email).HasField("Email");
            builder.Property(p => p.Password).HasField("Password");
            builder.Property(p => p.UserName).HasField("UserName");
            builder.Property(p => p.IsActive).HasField("IsActive");
        }
    }
}
